fix(macos): preserve capsule visibility in fullscreen spaces#642
Closed
XinShuichen wants to merge 1 commit into
Closed
fix(macos): preserve capsule visibility in fullscreen spaces#642XinShuichen wants to merge 1 commit into
XinShuichen wants to merge 1 commit into
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Summary
window.hide()on the capsule path with an AppKitorderOuthelper so the window does not get rebound to a regular SpaceWhy the current implementation still breaks
Previous fixes in #549 and #556 taught the capsule how to join all Spaces and fullscreen Spaces at show time. That helps for the first show, but the Tauri window still goes through the regular
hide()path:window.hide()window.hide()On macOS, that means the next show is starting from a normal hidden
NSWindowstate again, so the overlay can still fall back to the app's own desktop Space instead of the current fullscreen Space.This patch keeps the existing webview capsule, but treats its
NSWindowmore like a non-activating HUD overlay:MoveToActiveSpaceandStationaryCanJoinAllSpaces+FullScreenAuxiliaryTransient,IgnoresCycle, and the non-activating panel style bitorderOutinstead of the regular Taurihide()pathVerification
npm --prefix "openless-all/app" run check:macos-capsule-spacesgit diff --checkNotes
cargo testin this fork clone because the checkout is missing thevendor/qwen-asrC sources required bybuild.rs.PR Type
Bug fix, Tests
Description
Overlay capsule on fullscreen macOS Spaces
Configure NSWindow with proper collection behavior, style mask, and window level
Hide capsule with orderOut instead of window.hide() to keep space association
Add unit tests and update contract test for new helpers
Diagram Walkthrough
File Walkthrough
coordinator.rs
Refactor macOS capsule overlay configuration and hideopenless-all/app/src-tauri/src/coordinator.rs
macos_capsule_collection_behavior,macos_capsule_style_mask,macos_capsule_window_levelshow_capsule_window_no_activateto apply overlay settingsbefore
orderFrontRegardlessprepare_capsule_window_for_overlayandhide_capsule_window_preserving_spacefunctionslib.rs
Use overlay-preserving hide on macOS startupopenless-all/app/src-tauri/src/lib.rs
prepare_capsule_window_for_overlayandhide_capsule_window_preserving_spaceinstead ofcapsule.hide()macos-capsule-spaces-contract.test.mjs
Update contract test for new overlay helpersopenless-all/app/scripts/macos-capsule-spaces-contract.test.mjs
hide helper
window.show()from forbidden listorderOutin hide helper